package com.uzai.console.web.user;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.uzai.console.dto.contract.ContractSignDto;
import com.uzai.console.dto.contract.ContractSignPageVo;
import com.uzai.console.dto.contract.ContractSignQuery;
import com.uzai.console.dto.user.UserJoinWhiteDto;
import com.uzai.console.jsonvo.contract.ContractSignAddressJson;
import com.uzai.console.service.contract.SysContractService;
import com.uzai.console.service.user.RiskLevelService;
import com.uzai.console.vo.contract.ContractDownLoadInfoVo;
import com.uzai.console.vo.contract.ContractStatusVo;
import com.uzai.console.vo.login.LoginVo;
import com.uzai.console.vo.user.RiskLevelVo;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "风险配置",tags = "个人微信|风险配置")
@RestController
public class RiskLevelController extends BaseController {
    @Autowired
    private RiskLevelService riskLevelService;

    @ApiOperation(value = "查看风险配置", notes = "查看风险配置", response = RiskLevelVo.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/riskLevel/getRiskLevelConfig")
    public Object getContractSignStatus(){
        return riskLevelService.selectList();
    }

    @ApiOperation(value = "加入白名单", notes = "加入白名单", response = Boolean.class)
    @ApiOperationSupport(order = 2)
    @PostMapping("/riskLevel/whitelist")
    public Object joinWhitelist(@RequestBody UserJoinWhiteDto userJoinWhiteDto){
        riskLevelService.joinWhitelist(userJoinWhiteDto);
        return true;
    }


}
